﻿CREATE PROCEDURE dbo.PriceLinesNOTParsedUpdate
(
	@ContragentId int,
	@GoodsCode int,
	@GoodsName varchar(150),
	@CountryName varchar(20),
	@ManufacturerName varchar(70),
	@Price decimal(19, 2),
	@Qntty int,
	@NDSTax tinyint,
	@BatchNumber varchar(20),
	@ReadyBefore smalldatetime,
	@ReestrPrice decimal(19, 2),
	@ReestrDate smalldatetime,
	@Mandatory bit,
	@Drastic bit,
	@RetailPack int,
	@ManufactureBarCode varchar(13),
	@GNVLS bit,
	@Note varchar(250),
	@Original_Id int,
	@Id int
)
AS
	SET NOCOUNT OFF;
UPDATE [PR].[PriceLinesNOTParsed] SET [ContragentId] = @ContragentId, [GoodsCode] = @GoodsCode, [GoodsName] = @GoodsName, [CountryName] = @CountryName, [ManufacturerName] = @ManufacturerName, [Price] = @Price, [Qntty] = @Qntty, [NDSTax] = @NDSTax, [BatchNumber] = @BatchNumber, [ReadyBefore] = @ReadyBefore, [ReestrPrice] = @ReestrPrice, [ReestrDate] = @ReestrDate, [Mandatory] = @Mandatory, [Drastic] = @Drastic, [RetailPack] = @RetailPack, [ManufactureBarCode] = @ManufactureBarCode, [GNVLS] = @GNVLS, [Note] = @Note WHERE (([Id] = @Original_Id));
	
SELECT Id, ContragentId, GoodsCode, GoodsName, CountryName, ManufacturerName, Price, Qntty, NDSTax, BatchNumber, ReadyBefore, ReestrPrice, ReestrDate, Mandatory, Drastic, RetailPack, ManufactureBarCode, GNVLS, Note FROM PR.PriceLinesNOTParsed WHERE (Id = @Id)